using System.Collections.Generic;
using MvcContrib.Pagination;
using Webshop20.Application.DataTransferObjects;

namespace Webshop20.Application.Queries.Messages
{
    public class GetProductsResponse : MessageBase
    {
        public IPagination<ProductDTO> ProductsPaged { get; set; }

        public IEnumerable<ProductDTO> Products { get; private set; }

        public int TotalCount{ get; private set; }

        public int PageIndex{  get; private set; }

        public int PageSize{ get; private set; }

        public GetProductsResponse(IPagination<ProductDTO> productsPaged, IEnumerable<ProductDTO> products, int totalCount, int pageIndex, int pageSize)
        {
            Products = products;
            TotalCount = totalCount;
            PageIndex = pageIndex;
            PageSize = pageSize;
            ProductsPaged = productsPaged;
        }
    }
}